//
//  ShapesBootcamp.swift
//  SwiftUiExercise
//
//  Created by 徐鹏 on 2023/6/23.
//

import SwiftUI

struct ShapesBootcamp_04: View {
    var body: some View {
        
        VStack{
            
            RoundedRectangle(cornerRadius: 50).fill(Color.yellow)
                .frame(width: 300,height: 200)
            
            Capsule(style: .continuous).fill(Color.green)
                .frame(width: 200,height: 100)
          
            Ellipse().trim(from: 0.2,to: 1.0)
                .frame(width: 200,height: 200)
            
            Circle().stroke(Color.purple,lineWidth:50)
                .frame(width: 100,height: 100)
            Circle().stroke()
                //.trim(from: 0.2,to: 1.0)
                // 设置半圆 from 设置积分之几 的圆形
    //            .stroke(Color.orange,
    //                    style:StrokeStyle(lineWidth: 30,
    //                                      lineCap: .round,dash: [30]
    //                                     )
    //            ) //设置空心
               // .fill(Color.green) //填充颜色
        }
        
      
            
    }
}

struct ShapesBootcamp_Previews: PreviewProvider {
    static var previews: some View {
        ShapesBootcamp_04()
    }
}
